
function dropdw(){
    var data
    $.ajax({
        url : "/curriculum/primary/getAllDropDownBox",
        dataType : 'json',
        async:false,
        type : 'get',
        data :[],
        success : function(res) {
            data = res.data;
        }
    })
    return data;
}
layui.use(['dropdown',"form"], function(){
    var dropdown = layui.dropdown
    var form = layui.form
    let dropdw1 = dropdw();



    dropdown.render({
        elem: '#demo1' //可绑定在任意元素中，此处以上述按钮为例
        ,data: dropdw1
        ,id: 'demo1'
        //菜单被点击的事件
        ,click: function(obj){

            curriculumClassificationid = obj.id
            $("input[name='curriculumClassificationid']").val(obj.id)

        }
    });
    form.on('submit(*)', function(data){

        console.log(data.field) //当前容器的全部表单字段，名值对形式：{name: value}
        parent.abvancedQuery(data.field)
        var index = parent.layer.getFrameIndex(window.name);
        parent.layer.close(index);
    });
});
